 $(function () {
        windowStyle();
        $(window).resize(function () {
            windowStyle();
        });

        // 调整整个窗口大小
        function windowStyle() {
            let windowWidth = $(this).width();
            let windowHeight = $(this).height();
            $(".wrap-all").css({
                "width": windowWidth + "px",
                "height": windowHeight + "px"
            });
        }
        let option1 = {
            title: {
                text: '本年每月订单分析'
            },
            tooltip: {
                show: true,
                trigger: 'axis'
            },
            grid: {
                width: 'auto',
                bottom: '20px',
                right: '20px',
                left: '3%'
            },
            legend: {
                data: ['意向订单', '确定订单']
            },
            toolbox: {
                show: true,
                feature: {
                    magicType: { show: true, type: ['line', 'bar'] },
                    restore: { show: true },
                    saveAsImage: { show: true }
                },
                showTitle: true,
                width: 'auto',
                height: 'auto',
            },
            hoverLink: true,
            xAxis: [{
                type: 'category',
                data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
            }],
            yAxis: [{
                type: 'value'
            }],
            series: [{
                name: '意向订单',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
            },
            {
                name: '确定订单',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
            }]
        };

        echarts.init(document.getElementById("this-echarts")).setOption(option1);


        
        let option2 = {
            title: {
                text: '合同上订单分析'
            },
            tooltip: {
                show: true,
                trigger: 'axis'
            },
            grid: {
                width: 'auto',
                bottom: '20px',
                right: '20px',
                left: '3%'
            },
            legend: {
                data: ['意向订单', '确定订单']
            },
            toolbox: {
                show: true,
                feature: {
                    magicType: { show: true, type: ['line', 'bar'] },
                    restore: { show: true },
                    saveAsImage: { show: true }
                },
                showTitle: true,
                width: 'auto',
                height: 'auto',
            },
            hoverLink: true,
            xAxis: [{
                type: 'category',
                data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
            }],
            yAxis: [{
                type: 'value'
            }],
            series: [{
                name: '意向订单',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
            },
            {
                name: '确定订单',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20, 5, 20, 36, 10, 10, 20]
            }]
        };
        echarts.init(document.getElementById("join-echarts")).setOption(option2);
    });